#!/bin/bash
chmod 777 *.sh
CURRENT_DIR=$(pwd)

rm -rf ~/.ssh/*
ssh-keygen -t ed25519 -C "888"
cat ~/.ssh/id_ed25519.pub
read -n 2
ssh -T git@gitee.com
cd ~/.ssh
rm -rf my.tar *.enc
tar -cf my.tar id_ed25519 id_ed25519.pub
openssl enc -aes-256-cbc -pbkdf2 -salt -in my.tar -out my.tar.enc
cp my.tar.enc $CURRENT_DIR
rm -rf my.tar *.enc

git push git@gitee.com:t1c/a2.git
